package com.example.pufang.controller;

import com.example.common.CommonResult;
import com.example.pufang.service.EChartService;
import com.example.pufang.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/echart")
@CrossOrigin
@Api(tags = "web图表信息接口")
public class EChartController {

    @Autowired
    private EChartService eChartService;

    @Operation(summary = "获取用户登录图表信息")
    @GetMapping("/getEChartDayInfo")
    public CommonResult<Map<String, Object>> getLoginEChartDayInfo() {
        return CommonResult.success(eChartService.getLoginEChartDayInfo());
    }

}
